/*
* 入库详情
* */

import 'dart:convert';

import 'package:center_beijing/common/styles.dart';
import 'package:center_beijing/common/utils.dart';
import 'package:flutter/material.dart';
import 'package:get/get.dart';

class WarehousingDetail extends StatefulWidget {

  @override
  _WarehousingDetailState createState() => _WarehousingDetailState();
}

class _WarehousingDetailState extends State<WarehousingDetail> {

  var currentDetail = json.decode(Get.arguments['operateContentDetail']);

  @override
  Widget build(BuildContext context) {
    return Scaffold(
      appBar: AppBar(
        title: Text('入库详情'),
      ),
      body: SafeArea(
        child: Container(
          child: SingleChildScrollView(
            child: Column(
              crossAxisAlignment: CrossAxisAlignment.start,
              children: [
                Container(
                  padding: EdgeInsets.fromLTRB(Styles.spacing8, Styles.spacing8, Styles.spacing8, Styles.spacing8),
                  child: Text("仓库  ${currentDetail['inWarehouseName']}",style: TextStyle(color: Styles.DetailColor,fontSize: Styles.NormalFont),),
                ),
                Container(
                  padding: EdgeInsets.fromLTRB(Styles.spacing8, Styles.spacing8, Styles.spacing8, Styles.spacing8),
                  child: Text("库位  ${currentDetail['inStorageName']}",style: TextStyle(color: Styles.DetailColor,fontSize: Styles.NormalFont),),
                ),
                Container(
                  padding: EdgeInsets.fromLTRB(Styles.spacing8, Styles.spacing8, Styles.spacing8, Styles.spacing8),
                  child: Text("操作人  ${currentDetail['operatorName']}",style: TextStyle(color: Styles.DetailColor,fontSize: Styles.NormalFont),),
                ),
                Container(
                  padding: EdgeInsets.fromLTRB(Styles.spacing8, Styles.spacing8, Styles.spacing8, Styles.spacing8),
                  child: Text("入库时间  ${Utils.dateTimeUtil(DateTime.fromMillisecondsSinceEpoch(currentDetail['inTime']).toIso8601String())}",style: TextStyle(color: Styles.DetailColor,fontSize: Styles.NormalFont),),
                )
              ],
            ),
          ),
        ),
      ),
    );
  }
}
